
import java.security.Provider.Service;
import javax.xml.namespace.QName;
import java.io.BufferedReader; 
import java.io.DataInputStream; 
import java.io.FileInputStream; 
import java.io.FileReader; 
import java.io.IOException; 
import java.io.InputStream; 
import java.io.ObjectInputStream; 
import java.io.Reader; 
import java.io.StringBufferInputStream; 
import java.net.MalformedURLException; 
import java.net.URL; 
import java.net.URLConnection; 
import java.nio.IntBuffer; 
import java.util.List;

import javax.naming.InitialContext; 
import javax.xml.soap.SOAPBody;

import org.apache.axis.AxisFault; 
import org.apache.axis.client.Call; 
import org.apache.axis.message.SOAPEnvelope; 
import org.apache.axis.utils.ByteArray; 
import org.apache.soap.Body; 
import org.xml.sax.SAXException;

import com.ibi.edaqm.XDDocument; 
import com.sun.web.server.WebService;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ronaldo
 */
public class Consume {

    public static void main(String a[]) {
        Call call = null;
        Service service = new Service();
        try {
            call = (Call) service.createCall();
            call.setTargetEndpointAddress("URL");
            call.setUsername("usuario");
            call.setPassword("contraseña")
            );
call.setOperationName(new QName("name of the webservice", "service"));
            org.w3c.dom.Element test = (org.w3c.dom.Element) call.invoke(array 
            of objects
         ) } 
catch (ServiceException e) {
            e.printstacktrace();
            System.err.println("error");
        }
    }
}
